<?php

/**
*	Initializeren van de config
*	
*/
require_once('config.php');
require_once('router.php');
require_once('abstactModule.php');

mysql_connect($config->mysql->server,$config->mysql->user, $config->mysql->pass);
mysql_select_db($config->mysql->db);

/**
*	Initiializeren van Twig, de template parser.
*/
require_once ($config->path->root.'/libs/Twig/Autoloader.php');
require_once ($config->path->root.'/libs/Twigfilters.php');
require_once ($config->path->root.'/libs/TwigFunctions.php');
Twig_Autoloader::register();

$loader = new Twig_Loader_Filesystem($config->path->root.'templates');
$twig = new Twig_Environment($loader);
$twig->addFilter('milis', new Twig_Filter_Function('milis_to_time'));
$twig->addFunction('require_path', new Twig_Function_Function('require_path'));
$twig->addFunction('debug', new Twig_Function_Function('var_dump'));

/**
*	query string definieren
*/
$query = "";
if(isset($_GET['query']))
	$query = $_GET['query'];
?>